<template>
     <tr>
        <td>
            <input type="checkbox" :checked="item.checked" @change="$emit('change-event',item.name)">
        </td>
        <td>{{item.name}}</td>
        <td>{{item.price}}</td>
        <td>
            <button @click="$emit('red-event',item.name)">-</button>
            {{item.num}}
            <button @click="$emit('add-event',item.name)">+</button>
        </td>
        <td>{{item.price*item.num}}</td>
        <td>
            <button @click="$emit('del-event',item.name)">删除</button>
        </td>
     </tr>
</template>
 
<script>
export default {
  name: "MyTbody",
  components: {},
  props: {
    item:{
        type:Object,
        required:true
    }
  },
  data() {
    return {
        msg:this.item
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {}
};
</script>

<style scoped>
     
</style>